// 导入axios实例
import httpRequest from '../request/index'


// 添加电视剧链接
export function addTeleplayLink(tlink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/tlink/add`,
        method: 'post',
        data: tlink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 删除电视剧链接
export function deleteTeleplayLink(id) {
    return httpRequest({
        baseURL: '/admin',
        url: `/tlink/${id}`,
        method: 'delete',
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}


// 编辑电视剧链接
export function editTeleplayLink(id, tlink) {
    return httpRequest({
        baseURL: '/admin',
        url: `/tlink/${id}`,
        method: 'put',
        data: tlink,
        headers: { Authorization: window.sessionStorage.getItem('token') }
    });
}
